package com.acc.mobileappr.entities;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.sql.Date;

/**
 * Created by IntelliJ IDEA.
 * User: user
 * Date: Apr 20, 2011
 * Time: 10:54:42 AM
 * To change this template use File | Settings | File Templates.
 */
@javax.persistence.IdClass(com.acc.mobileappr.entities.MstMApprNavEntityPK.class)
@javax.persistence.Table(name = "MST_M_APPR_NAV", schema = "ACC_BBMX")
@Entity
public class MstMApprNavEntity {
    private String docId;

    @javax.persistence.Column(name = "DOC_ID")
    @Id
    public String getDocId() {
        return docId;
    }

    public void setDocId(String docId) {
        this.docId = docId;
    }

    private String version;

    @javax.persistence.Column(name = "VERSION")
    @Id
    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    private String screenFrom;

    @javax.persistence.Column(name = "SCREEN_FROM")
    @Id
    public String getScreenFrom() {
        return screenFrom;
    }

    public void setScreenFrom(String screenFrom) {
        this.screenFrom = screenFrom;
    }

    private String screenTo;

    @javax.persistence.Column(name = "SCREEN_TO")
    @Id
    public String getScreenTo() {
        return screenTo;
    }

    public void setScreenTo(String screenTo) {
        this.screenTo = screenTo;
    }

    private String description;

    @javax.persistence.Column(name = "DESCRIPTION")
    @Basic
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    private Date createdDate;

    @javax.persistence.Column(name = "CREATED_DATE")
    @Basic
    public Date getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    private Date updatedDate;

    @javax.persistence.Column(name = "UPDATED_DATE")
    @Basic
    public Date getUpdatedDate() {
        return updatedDate;
    }

    public void setUpdatedDate(Date updatedDate) {
        this.updatedDate = updatedDate;
    }

    private String createdBy;

    @javax.persistence.Column(name = "CREATED_BY")
    @Basic
    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    private String updatedBy;

    @javax.persistence.Column(name = "UPDATED_BY")
    @Basic
    public String getUpdatedBy() {
        return updatedBy;
    }

    public void setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MstMApprNavEntity that = (MstMApprNavEntity) o;

        if (createdBy != null ? !createdBy.equals(that.createdBy) : that.createdBy != null) return false;
        if (createdDate != null ? !createdDate.equals(that.createdDate) : that.createdDate != null) return false;
        if (description != null ? !description.equals(that.description) : that.description != null) return false;
        if (docId != null ? !docId.equals(that.docId) : that.docId != null) return false;
        if (screenFrom != null ? !screenFrom.equals(that.screenFrom) : that.screenFrom != null) return false;
        if (screenTo != null ? !screenTo.equals(that.screenTo) : that.screenTo != null) return false;
        if (updatedBy != null ? !updatedBy.equals(that.updatedBy) : that.updatedBy != null) return false;
        if (updatedDate != null ? !updatedDate.equals(that.updatedDate) : that.updatedDate != null) return false;
        if (version != null ? !version.equals(that.version) : that.version != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = docId != null ? docId.hashCode() : 0;
        result = 31 * result + (version != null ? version.hashCode() : 0);
        result = 31 * result + (screenFrom != null ? screenFrom.hashCode() : 0);
        result = 31 * result + (screenTo != null ? screenTo.hashCode() : 0);
        result = 31 * result + (description != null ? description.hashCode() : 0);
        result = 31 * result + (createdDate != null ? createdDate.hashCode() : 0);
        result = 31 * result + (updatedDate != null ? updatedDate.hashCode() : 0);
        result = 31 * result + (createdBy != null ? createdBy.hashCode() : 0);
        result = 31 * result + (updatedBy != null ? updatedBy.hashCode() : 0);
        return result;
    }
}
